Z-index preventing on hover attribute on another element [migrated]
Posted
by
user18294
on Pro Webmasters
See other posts from Pro Webmasters
or by user18294
Published on 2012-09-25T10:29:48Z
Indexed on
2012/09/25
15:50 UTC
Read the original article
Hit count: 207
web-development
|css
I have two different elements (div class="") within a larger container.
Let's call them div class="overlay_container" and div class="title." The div class="overlay_container" has a subclass, .image, which creates an overlay over the entire larger container on hover.
The div class="title" has a z-index of 10,000 and lies over .image and therefore over the overlay. Unfortunately, when you hover over "title," the subclass overlay image underneath disappears.
I know the problem is obviously that the "title" div is right over the other divs and therefore the on hover will disappear due to the z-index. But how do I fix this? How do I make it so that when you hover over the "title," the .image overlay still appears?
If your answer involves jQuery, could you please tell me where to put the script (before the /head tag)? Thanks!
© Pro Webmasters or respective owner